<template>
    <div class="classCard">
        <div v-if="showFaceCard">
            <img src="/static/img/class_card.png" width="419px" height="434px">
            <p class="classCardP">温馨提示：系统尚未收到您的结业信息，因协会需要一定的时间汇集信息。预计将于学习完成后的3个工作日，发放结业证书，给您带来不便敬请谅解！</p>
        </div>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                showFaceCard: false,
                tradeNo: this.$route.params.tradeNo,
            }
        },
        mounted: function() {
            var that = this;
            this.common.post(this.api.getMyLessonCertificates, {tradeNo:this.tradeNo}, function(res) {
                if (!String.isEmptyOrNUll(res.resultMap.certificateUrl)) {
                    window.location.href = res.resultMap.certificateUrl;
                } else {
                    that.showFaceCard = true;
                }
            });
        }
    }
</script>

<style>
    .classCard {
        text-align: center;
        padding-top: 160px;
    }

    .classCardP {
        font-size: 35px;
        color: #333333;
     padding: 0 50px;
    }
</style>
